<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:82:"D:\PhpStudy\PHPTutorial\WWW\03seo7mb.net\public/../app/admin\view\seo\consume.html";i:1566526472;}*/ ?>
<style>
    td,th{
        text-align: center;
    }
</style>
<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">

        </div>
        
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">



                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="<?php echo input('search_data'); ?>" placeholder="输入用户名搜索">

                    <div class="input-group-btn">
                      <button type="button" id="search"  url="<?php echo url('consume'); ?>" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>


      <div class="row" style="margin-top: 20px;padding: 20px;"  >


          <table class="table table-bordered">
              <thead style="font-size: 18px;">
              <tr>
                  <th></th>
                  <th>累计消费</th>
                  <th>上月消费</th>
                  <th>今天消费</th>
                  <th>昨日消费</th>
                  <th>本周消费</th>
                  <th>本月消费</th>
                  <th>近三月消费</th>
                  <th>近一年消费</th>
              </tr>
              </thead>

              <tbody>
              <tr style="font-size: 18px;">
                  <td>合计</td>
                  <td><?php echo (isset($info['ljxf']) && ($info['ljxf'] !== '')?$info['ljxf']:0); ?></td>
                  <td><?php echo (isset($info['syxf']) && ($info['syxf'] !== '')?$info['syxf']:0); ?></td>
                  <td><?php echo (isset($info['jrxf']) && ($info['jrxf'] !== '')?$info['jrxf']:0); ?></td>
                  <td><?php echo (isset($info['zrxf']) && ($info['zrxf'] !== '')?$info['zrxf']:0); ?></td>
                  <td><?php echo (isset($info['j7day']) && ($info['j7day'] !== '')?$info['j7day']:0); ?></td>
                  <td><?php echo (isset($info['onemom']) && ($info['onemom'] !== '')?$info['onemom']:0); ?></td>
                  <td><?php echo (isset($info['j3mom']) && ($info['j3mom'] !== '')?$info['j3mom']:0); ?> </td>
                  <td><?php echo (isset($info['onyer']) && ($info['onyer'] !== '')?$info['onyer']:0); ?> </td>
              </tr>
              </tbody>

          </table>


          </div>
      
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>用户名</th>
          <th>可用余额</th>
          <th>累计消费</th>
          <th>上月消费</th>
          <th>今日消费</th>
          <th>昨日消费</th>
          <th>本周消费</th>
          <th>本月消费</th>
          <th>近三月消费</th>
          <th>近一年消费</th>
          <th>优化公司</th>
      </tr>
      </thead>
      
      <?php if(!(empty($list["0"]["id"]) || (($list["0"]["id"] instanceof \think\Collection || $list["0"]["id"] instanceof \think\Paginator ) && $list["0"]["id"]->isEmpty()))): ?>
        <tbody>
            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?>
                <tr>
                    <td><?php echo $vo['username']; ?></td>
                    <td><?php echo $vo['price']; ?></td>
                    <td><?php echo (isset($tls[$k]['xfAllNum']) && ($tls[$k]['xfAllNum'] !== '')?$tls[$k]['xfAllNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['syXfNum']) && ($tls[$k]['syXfNum'] !== '')?$tls[$k]['syXfNum']:0); ?>元</td>
                    <td style="color: red;"><?php echo (isset($tls[$k]['jrAllNum']) && ($tls[$k]['jrAllNum'] !== '')?$tls[$k]['jrAllNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['zrXfNum']) && ($tls[$k]['zrXfNum'] !== '')?$tls[$k]['zrXfNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['j7dayXfNum']) && ($tls[$k]['j7dayXfNum'] !== '')?$tls[$k]['j7dayXfNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['byXfNum']) && ($tls[$k]['byXfNum'] !== '')?$tls[$k]['byXfNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['threeXfNum']) && ($tls[$k]['threeXfNum'] !== '')?$tls[$k]['threeXfNum']:0); ?>元</td>
                    <td><?php echo (isset($tls[$k]['yyqXfNum']) && ($tls[$k]['yyqXfNum'] !== '')?$tls[$k]['yyqXfNum']:0); ?>元</td>
                    <td><span class="label label-info"><?php echo $vo['dlname']; ?></span></td>
                </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
        <?php else: ?>
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top"><?php echo config('empty_list_describe'); ?></td></tr></tbody>
      <?php endif; ?>
    </table>
  </div>

  <div class="box-footer clearfix text-center">
      <?php echo $list->render(); ?>
  </div>

</div>

<script>
    //导出功能
    $(".export").click(function(){
        
        window.location.href = searchFormUrl($(".export"));
    });
</script>